<template>
	<view class="top box">
		<view class="iconfont iconfanhui flex-1" @tap='goBack'>
		</view>
		<view class="title flex-1">
			{{shopName}}
		</view>
		<view class="icon flex-1 box d-ai-c box">
			<view class="iconfont iconfangdajing flex-3 mr-2">

			</view>
			<view class="box d-ai-c flex-4 address-box d-jc-end" @tap='jumpTo'>
				<view class="iconfont icon-location">
				</view>
				<view class="address text-heide-1 ml-1">{{addressName}}</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		name: "state-bar",
		props: {
			shopName: {
				type: String,
				default: ''
			},
			addressName: {
				type: String,
				default: ''
			},

		},
		data() {
			return {

			};
		},
		methods: {
			jumpTo() {
				uni.navigateTo({
					url: '../shopList/locateadress',
					animationType: 'pop-in',
					animationDuration: 200
				})
			},
			goBack() {
				uni.navigateTo({
					url: "../index/index",
					animationType: 'pop-in',
					animationDuration: 350
				})
			},

		}
	}
</script>

<style lang="less">
	.top {
		color: #fff;
		padding: var(--status-bar-height) 20rpx 10rpx 20rpx;
		background-color: rgb(255, 85, 81);

		.icon {
			.iconfangdajing {
				font-size: 36rpx;
				text-align: right;
			}

			.icon-location {
				font-size: 36rpx;
			}

			.address {
				font-size: 32rpx;

			}

			.address-box {
				width: 210rpx;
				text-align: right;
			}
		}

		.iconfanhui {
			font-size: 32rpx;
		}

		.title {
			text-align: center;
			font-size: 32rpx;
		}
	}
</style>
